<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        i {
            position: relative;
        }

        .img2 {
            position: absolute;
            left: 150px;
            top: 50px;
            width: 400px;
            height: 440px;
            display: none;
        }

        .show{
            position: absolute;
            left: 150px;
            top: 50px;
            width: 400px;
            height: 440px;
            display: block;
        }
    </style>
</head>

<body>
    <img src="../imgs/5.png" id="img1">
    <img src="../imgs/收款码.jpg" class="img2">
    <script>
        let img1 = document.querySelector('#img1')
        let img2 = document.querySelector('.img2')
        
        img1.onmouseover = fn1
        img1.onmouseout = fn2

        function fn1(){
            img2.className = 'show'
        }

        function fn2(){
            img2.className = 'img2'
        }

    </script>
</body>

</html>